﻿//********************************************************************************//
//创建日期：<创建日期，2010-08-02>
//创建作者：<王一飞，wangyifei@shanghai3h.com>
//功能说明：YS_YG_YONGHUXXBLL层
//********************************************************************************//
namespace BLL
{
    using System.Data;
    using Access;
    using Entity;
    using Oracle.DataAccess.Client;
    using Platform.Data;
    public class YS_YG_YONGHUXXBLL : YS_YG_YONGHUXXProcess
    {
        #region Field
        private string ConnectionString;
        #endregion
        #region Construction
        public YS_YG_YONGHUXXBLL()
        {
            ConnectionString = base.conn;
        }
        #endregion
        #region Method

        /// <summary>
        /// 按类型更新
        /// </summary>
        /// <param name="YS_YG_YONGHUXX"></param>
        /// <param name="ileixing">null:更新本月下月,0:更新本月 1:更新下月</param>
        /// <returns></returns>
        public void UpdateYS_YG_YONGHUXX(YS_YG_YONGHUXX YS_YG_YONGHUXX, decimal? V_LEIXING, out string V_FIEDLLIST, out string V_QUEREN, out string V_RSNO, out string V_RSMSG)
        {
            string spName = "P_UpdYS_YG_YONGHUXX";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = YS_YG_YONGHUXX.S_YONGHUH;
            storedParams[1].Value = YS_YG_YONGHUXX.S_XINGZHENGQBH;
            storedParams[2].Value = YS_YG_YONGHUXX.S_JUBIANH;
            storedParams[3].Value = YS_YG_YONGHUXX.S_GONGSIBH;
            storedParams[4].Value = YS_YG_YONGHUXX.S_YONGHUM;
            storedParams[5].Value = YS_YG_YONGHUXX.S_DIZHI;
            storedParams[6].Value = YS_YG_YONGHUXX.S_YOUBIAN;
            storedParams[7].Value = YS_YG_YONGHUXX.S_LIANXIBM;
            storedParams[8].Value = YS_YG_YONGHUXX.S_LIANXIR;
            storedParams[9].Value = YS_YG_YONGHUXX.S_LIANXIDH;
            storedParams[10].Value = YS_YG_YONGHUXX.S_YINHANGZH;
            storedParams[11].Value = YS_YG_YONGHUXX.S_KAIHUHM;
            storedParams[12].Value = YS_YG_YONGHUXX.S_KAIHUYH;
            storedParams[13].Value = YS_YG_YONGHUXX.I_SHOUFEIFS;
            storedParams[14].Value = YS_YG_YONGHUXX.I_CHENNUOFF;
            storedParams[15].Value = YS_YG_YONGHUXX.S_BEIZHU;
            storedParams[16].Value = YS_YG_YONGHUXX.S_YONGSHUIXZ;
            storedParams[17].Value = YS_YG_YONGHUXX.S_SHESHUIDXDM;
            storedParams[18].Value = YS_YG_YONGHUXX.I_KAOHEFY;
            storedParams[19].Value = YS_YG_YONGHUXX.S_YEWUY;
            storedParams[20].Value = YS_YG_YONGHUXX.N_YSJ;
            storedParams[21].Value = YS_YG_YONGHUXX.D_XIUGAIRQ;
            storedParams[22].Value = YS_YG_YONGHUXX.D_HUJIXGRQ;
            storedParams[23].Value = YS_YG_YONGHUXX.S_XIUGAIR;
            storedParams[24].Value = YS_YG_YONGHUXX.S_CAOZUOR;
            storedParams[25].Value = YS_YG_YONGHUXX.D_CAOZUOSJ;
            storedParams[26].Value = V_LEIXING;
            OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            V_FIEDLLIST = storedParams[27].Value is System.DBNull ? null : (string)storedParams[27].Value;
            V_QUEREN = storedParams[28].Value is System.DBNull ? null : (string)storedParams[28].Value;
            V_RSNO = storedParams[29].Value is System.DBNull ? null : (string)storedParams[29].Value;
            V_RSMSG = storedParams[30].Value is System.DBNull ? null : (string)storedParams[30].Value;
        }

        /// <summary>
        /// 开户
        /// </summary>
        /// <param name="yh">用户信息</param>
        /// <param name="type">0:开户 1:开户后修改</param>
        /// <param name="id">返回本月记录ID</param>
        public void KaiHu(YS_YG_YONGHUXX yh, int? type, out string id)
        {
            new SpHelper().P_YSYG_KAIHU(type, yh.S_YONGHUH,yh.S_ZHANDIANBH,yh.S_GUANLIKBH,yh.S_XINGZHENGQBH,yh.S_JUBIANH,yh.S_GONGSIBH,yh.S_YONGHUM,yh.S_DIZHI,yh.S_YOUBIAN,
                                        yh.S_LIANXIBM,yh.S_LIANXIR,yh.S_LIANXIDH,yh.S_YINHANGZH,yh.S_KAIHUHM,yh.S_KAIHUYH,yh.I_SHOUFEIFS,yh.I_CHENNUOFF,yh.S_YONGSHUIXZ,
                                        yh.S_SHESHUIDXDM,yh.I_KAOHEFY,yh.S_YEWUY,yh.S_XIUGAIR,yh.S_BEIZHU,yh.S_CAOZUOR,out id);
        }

        #endregion
    }
}